import Vue from "vue";
import VueRouter from "vue-router";
Vue.use(VueRouter);

const routes = [
  {
    path: "/settings",
    component: () => import("../views/UserSettings.vue"),
    children: [
      {
        path: "emails",
        component: () => import("../views/UserEmailsSubscriptions.vue"),
      },
      {
        path: "profile",
        components: {
          default: () => import("../views/UserProfile.vue"),
          helper: () => import("../views/UserProfilePreview.vue"),
        },
      },
    ],
  },
];

const router = new VueRouter({
  routes,
});

export default router;
